<template>
  <div>
    <label>关键词：<input v-model="keyword" /></label>
    <label>地区：<input v-model="location" /></label>
    <baidu-map class="map" center="长沙" :scroll-wheel-zoom="true">
      <bm-view class="map1"></bm-view>
      <bm-local-search
        :keyword="keyword"
        :auto-viewport="true"
        :location="location"
      ></bm-local-search>
    </baidu-map>
  </div>
</template>

<script>
export default {
  data() {
    return {
      location: "长沙",
      keyword: "民政",
    };
  },
};
</script>
<style scoped>
.map {
  width: 100%;
  height: 100%;
}

.map1 {
  height: 400px;
}
</style>